Skip to main content

AssignPrivateIpAddresses

Description

call AssignPrivateIpAddresses to assign one or more secondary private IP addresses to an elastic network card. You can specify an idle private IP address at the switch (VSwitch) to which you belong for the network card, or automatically assign a private IP address by specifying the number of private network addresses.

Request Method

POST

Request Path

/apsara/route/Ecs/AssignPrivateIpAddresses

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
SecondaryPrivateIpAddressCountBODYintegerNo1specify the number of private IP addresses and automatically assign IP addresses from the idle IP addresses of the switch.
regionIdBODYstringYesNo sample value for this parameter.region id
PrivateIpAddress.NBODYrepeatlistNo10.1.2.1select one or more secondary private IP addresses from the idle IP addresses of the switch to which the elastic network card belongs. Value range of n: ENI is available (Available) state: 1~10. The ENI is in the bound (InUse) state: limited by instance specifications. when assigning a secondary private IP address, you cannot specify parameters PrivateIpAddress.N and parameters SecondaryPrivateIpAddressCount.
RegionIdBODYstringYescn-qingdao-env17-d01the region to which the elastic network card belongs. You can call the DescribeRegions to view the latest Alibaba Cloud region list.
NetworkInterfaceIdBODYstringYeseni-bp67acfmxazb4p****ENI ID.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}